import request from '@/utils/request'

// 查询签署列表
export function listSign(query) {
  return request({
    url: '/work/sign/list',
    method: 'get',
    params: query
  })
}

// 查询签署详细
export function getSign(signId) {
  return request({
    url: '/work/sign/' + signId,
    method: 'get'
  })
}

// 新增签署
export function addSign(data) {
  return request({
    url: '/work/sign',
    method: 'post',
    data: data
  })
}

// 修改签署
export function updateSign(data) {
  return request({
    url: '/work/sign',
    method: 'put',
    data: data
  })
}

// 删除签署
export function delSign(signId) {
  return request({
    url: '/work/sign/' + signId,
    method: 'delete'
  })
}

// 提交审核
export function submit(riskId) {
  return request({
    url: '/work/sign/submit/' + riskId,
    method: 'put',
  })
}

// 撤销审核
export function revoke(riskId) {
  return request({
    url: '/work/sign/revoke/' + riskId,
    method: 'put',
  })
}

// 重新申请
export function reapply(riskId) {
  return request({
    url: '/work/sign/reapply/' + riskId,
    method: 'put',
  })
}
